<template>
  <el-dialog
    v-el-drag-dialog
    :title="title"
    :visible.sync="openSheet"
    width="1000px"
    :destroy-on-close="true"
    :close-on-click-modal="false"
  >
    <el-form ref="form" :model="form" disabled label-width="100px">
      <el-row>
        <el-col :span="8">
          <el-form-item :label="$t('currency')">
            <el-input v-model="form.currency" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('currencyName')">
            <el-input v-model="form.currency_name" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('currencyCountry')">
            <el-input v-model="form.currency_country" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancel">{{ $t('cancel') }}</el-button>
    </div>
  </el-dialog>
</template>

<script>
import elDragDialog from '@/directive/el-drag-dialog'
export default {
  directives: { elDragDialog },
  data() {
    return {
      title: undefined,
      openSheet: false,
      form: {}
    };
  },
  methods: {
    async openSheetDialog(data) {
      this.openSheet = !this.openSheet;
      this.title = this.$t('currencyInquireTitle');
      this.form = data;
    },
    cancel() {
      this.openSheet = !this.openSheet;
    }
  }
};
</script>

